<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<TITLE>『<?php echo (C("web_name")); ?>管理平台』</TITLE>
<link rel="stylesheet" type="text/css" href="../Public/css/main.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Css/shThemeDefault.css" />	
<!--[if IE]><link rel="stylesheet" type="text/css" href="../Public/css/ie.css" /><![endif]-->
<script type="text/javascript" src="../Public/js/common.js"></script>
<script type="text/javascript" src="../Public/js/jquery.min.js"></script>
<script type="text/javascript" src="../Public/js/jquery_ui_custom.js"></script>
<script type="text/javascript" src="../Public/js/jquery.form.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/shCore.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
//var $J=jQuery.noConflict();
//指定当前组模块URL地址 
var URL = '__URL__';
var ACTION_NAME = 'index';
var APP	 =	 '__APP__';
var PUBLIC = '__PUBLIC__';

jQuery(document).ready(function(){
    jQuery(document).bind("contextmenu",function(e){
        //return false;
    });
});
//-->
</SCRIPT>
</head>

<body>
<SCRIPT LANGUAGE="JavaScript">
<!--
function keydown(e){
	var e = e || event;
	if (e.keyCode==13)
	{
		loginsubmit();
	}
}
function loginsubmit(){
		$('#loginform').ajaxSubmit(function(data){
				if(data.status==1){
					window.location = '__APP__/Admin';
				}else{
					alert(data.info);
				}
		});
		return false;
}
function fleshVerify(type){ 
	//重载验证码
	var timenow = new Date().getTime();
	if (type)
	{
		$('#verifyImg').attr('src','__URL__/verify/adv/1/'+timenow);
	}else{
		$('#verifyImg').attr('src','__URL__/verify/'+timenow);
	}
}
if ( window != top){  window.top.location =window.location;}

jQuery(document).ready(function(){
    var user = $('#username').val();
    if(user==''){
    	$('#username').focus();
    }else{
    	$('#password').focus();
    }
});

//-->
</SCRIPT>

<body style="overflow:hidden;">
    <!-- Main content -->
    <div class="content" style="width:350px; margin:150px auto;">
    	<div class="outer">    		
        	<div class="inner">   		
                <div class="page-header"><!-- Page header -->
                    <h5><i class="font-tasks"></i>管理员登录</h5>
                </div><!-- /page header -->
                
                <div class="body">

                    <!-- Content container -->
                    <div class="container">                  	
                	
                        <!-- Table with options -->
                        <div class="block well">
													<div id="result"></div>
													<FORM METHOD=POST name="login" id="loginform" action="<?php echo U('Admin/Public/checkLogin');?>">
													<TABLE id="checkList"  class="table table-bordered table-striped table-block" cellpadding=0 cellspacing=0 >
													<TR class="row" ><TD class="tRight" width="25%">帐　号：</TD><TD><INPUT TYPE="text" style="width: 120px;" onkeydown="keydown(event)" id="username" NAME="account" value="<?php echo ($admin_userId); ?>"></TD></TR>
													<TR class="row" ><TD class="tRight">密　码：</TD><TD><INPUT TYPE="password" style="width: 120px;" onkeydown="keydown(event)" id="password" NAME="password" value=""></TD></TR>
													<?php if((C("ADV_LOGIN_VERIFY")) == "1"): ?><TR class="row" ><TD class="tRight">验证码：</TD><TD><INPUT TYPE="text" style="width: 120px;" onkeydown="keydown(event)" NAME="verify"> </TD></TR>
													<TR class="row" ><TD class="tCenter" colspan="2" style="color:gray;">请输入帐号验证码对应的英文字母</TD></TR>
													<TR class="row" ><TD class="tRight">数 字：<BR>英 文：</TD><TD><IMG id="verifyImg" SRC="__URL__/verify/adv/1/" onclick="fleshVerify(1)" BORDER="0" ALT="点击刷新验证码" style="cursor:pointer" align="absmiddle"></TD></TR>
													<?php else: ?>
													<TR class="row" ><TD class="tRight">验证码：</TD><TD><INPUT TYPE="text" style="width: 120px;" onkeydown="keydown(event)" NAME="verify" > <IMG id="verifyImg" SRC="<?php echo U('Admin/Public/verify');?>" onclick="fleshVerify()" BORDER="0" ALT="点击刷新验证码" style="cursor:pointer" align="absmiddle"></TD></TR><?php endif; ?>
													<TR class="row" ><TD class="body align-center" align="justify" colspan="2">
													<INPUT TYPE="hidden" name="ajax" value="1">
													<!-- <INPUT TYPE="reset" value="重 置" class="submit small"> -->
													<button type="button" onclick="loginsubmit();" class="btn btn-success"><i class="icon-lock"></i> &nbsp;登 录</button>&nbsp;&nbsp;
													<button type="button" onclick="javascript:history.go(-1);" class="btn btn-inverse"><i class="icon-off"></i> &nbsp;放 弃</button>
													</td></tr>
													</TABLE>
													</FORM>

										</div>
									</div>         
                </div>
            </div>
        </div>
    </div>
    <!-- /main content -->
</BODY>
</HTML>